<template>
  <div class="teacher">
    <div class="title">
      <div class="name">名师</div>
      <div class="img">
        <div class="bg">
          <img
            v-bind:src="courseTeacher[0].head_icon"
            alt=""
          />
        </div>
        <div class="teacher-img">
          <div class="img">
            <img
              v-bind:src="courseTeacher[0].head_icon"
              alt=""
            />
          </div>
          <div class="teacher-name">
            <img
                    v-bind:src="courseTeacher[0].teacher_icon"
              alt=""
            />
            <div>{{ courseTeacher[0].real_name}}</div>
          </div>
        </div>
      </div>
      <div class="info">
        简介：{{ courseTeacher[0].real_name}}
        {{ courseTeacher[0].describe}}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  created() {
    this.getCourseTeacher();
  },
  data(){
    return{
      courseTeacher:''
    }
  },
  methods:{
    getCourseTeacher(){
      this.$axios.post("/course/courseTeacher", {
        school_dns:'xuexi.longde999.cn',
        // id:this.$route.query.id,
        id:1,
        nature:this.$route.query.nature
      }).then(res => {
        this.courseTeacher= res.data;
        console.log(res);
      });
    }
  }
}
</script>

<style lang="less" scoped>
@import '../../../../common/index.less';
.teacher {
  padding: 25px 20px;
  background: @baseBgColor;
  margin-bottom: 30px;
  .title {
    .name {
      .before();
    }
    .img {
      position: relative;
      .bg {
        position: absolute;
        top: 30px;
        img {
          width: 100%;
          height: 74px;
        }
      }
      .teacher-img {
        position: relative;
        .flex('', center);
        z-index: 1;
        margin-left: 20px;
      }
      .teacher-name {
        position: relative;
        top: -10px;
        img {
          position: absolute;
        }
        div {
          position: relative;
          z-index: 10;
          padding: 10px 5px;
          writing-mode: vertical-lr;
          color: #75bef3;
        }
      }
    }
    .info{
      margin-top: 10px;
      font-size: 14px;
      color: #4D555D;
    }
  }
}
</style>
